Text styles

Contents

Style definition syntax

A special wiki command is provided for formatting text on wiki pages to set the text style (not to be confused with page styles). The general format of the command for setting a style is as follows: %parameters%text%%. This command can be applied to format a block of text (block style) or text within a paragraph (inline style).

Block style is defined using the following command:

%parameters%
formatted text
%%

It is important that the %style parameters% and %% lines start at the beginning of the line with no leading spaces.

Inline style is defined using a syntax that can be used within the text:

%parameters%text%%

Inside the inline command %...%...%%, there should be no line breaks, with the exception of the [[<<]] wiki command. Block style can contain multiple lines and paragraphs.

In both command formats, style parameters can include the following elements:

Named styles

OutWiker contains many built-in inline and block styles. Their full list can be seen in the style selection dialog (menu item Wiki - Formatting - Text style...) or in the Built-in styles and colors section.

For example:

Wiki notation Result
Regular text. %notice%Text with notice style%%. Regular text again. Regular text. Text with notice style. Regular text again.

Setting text color

Instead of a style name, you can specify colors - by name or in formats like #RRGGBB, #RGB, rgb(r,g,b). A list of built-in color names is provided in the Built-in colors section.

For example:

Wiki notation Result
Regular text. %blue%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %#A2F%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %#15acac%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.

Color can also be set using the color parameter:

Wiki notation Result
Regular text. %color=blue%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %color="#A2F"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %color="#15acac"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %color="rgb(200, 90, 128)"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.

Setting background color

There are several options for setting the background color of a part of a line or a block.

If you want to use one of the standard named colors as the background color, simply specify the color name with a bg_ or bg- prefix. For example:

Wiki notation Result
Regular text. %bg-yellow%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %bg_aqua%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.

You can also use the bgcolor parameter to specify the background color, which allows you to set colors not only by name but also using #RGB, #RRGGBB, and rgb(r,g,b) formats:

Wiki notation Result
Regular text. %bgcolor="#AB6"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %bgcolor="#AA66CC"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.
Regular text. %bgcolor="rgb(200, 90, 128)"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.

Advanced style settings


You can apply an arbitrary CSS style to a section of text or a block using the style parameter.

For example:

Wiki notation Result
Regular text. %style="font-weight: bold; border: 1px solid;"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.

Combining all of the above


All the parameters mentioned above can be used simultaneously. Also, multiple styles can be applied to the text.

For example:

Wiki notation Result
Regular text. %blue bg-yellow style="font-weight: bold; border: 1px solid;"%Styled text%%. Regular text again. Regular text. Styled text. Regular text again.

See also: